﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using kim.Common;

namespace kim
{
    public partial class MessageList : kim.UI.ManagePage
    {
        public string[] htmltext = new string[200];
        protected string StrPage;
        protected int pageSize, pageIndex, typeid;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                typeid = kim.Common.KIMRequest.GetInt("typeid", 0);
                GetStrPage();
                lb_wz.Text = "在线留言";
            }
        }
        private void GetStrPage()
        {
            pageIndex = KIMRequest.GetInt("p", 1);

            pageSize = 10;
            pageIndex = KIMRequest.GetInt("p", 1);
            kim.BLL.Message bll = new kim.BLL.Message();
            int count = SqlDbHelper.GetPageCurrent("Message", "MsType=" + typeid);
            using (DataSet dt = bll.GetNewsPager(pageIndex, pageSize, "", "AddTime Desc", "MsType=" + typeid))
            {
                rptlist.DataSource = dt;
                rptlist.DataBind();
            }
            StrPage = kim.Common.Utils.OutPageList(pageSize, pageIndex, count, "messageList.aspx?p=__id__&typeid=" + typeid, 8);
        }
    }
}